package com.singerw.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version V1.0
 * @Package com.singerw
 * @auhter 张欣
 * @date 2020/12/30-3:36 PM
 */

@RestController
@RequestMapping("/tasks/")
public class LoginController {

    @PreAuthorize("hasRole('ROLE_ADMIN')")
    @GetMapping("/hi")
    private String hi() {
        return "hi";
    }
}
